# Contributor: Ivan Tham <pickfire@riseup.net>
# Maintainer:
pkgname=googler
pkgver=4.3.2
pkgrel=2
pkgdesc="Google Search, Google Site Search, Google News from the terminal"
url="https://github.com/jarun/googler"
arch="noarch"
license="GPL-3.0-or-later"
depends="python3"
subpackages="$pkgname-doc
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/jarun/googler/archive/v$pkgver.tar.gz"

build() {
	make disable-self-upgrade
}

package() {
	make install DESTDIR="$pkgdir" PREFIX=/usr

	install -Dm644 "$builddir"/auto-completion/bash/* \
		-t "$pkgdir"/usr/share/bash-completion/completions
	install -Dm644 "$builddir"/auto-completion/fish/* \
		-t "$pkgdir"/usr/share/fish/completions
	install -Dm644 "$builddir"/auto-completion/zsh/* \
		-t "$pkgdir"/usr/share/zsh/site-functions
}

sha512sums="899cc45eea9102b9547c1a7697237bb9cc77093c670e09c74b1331c0f267fa3bb66f2fc58cf576f9ce30047757f0038cf447a0a510c5b2ff33ad68491c008dd9  googler-4.3.2.tar.gz"
